Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2113-T15-1] Jikan #28

Open
wants to merge 660 commits into
base: master
Choose a base branch
from

Conversation

siuhian
Copy link

@siuhian siuhian commented Mar 3, 2020


{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
## 2. Design
![image_info](./pictures/ClassDiagram.png)
Copy link

@joelczk joelczk Mar 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UML diagram describing the design of the program is too complicated. Perhaps it would be better to break the design down into smaller components to describe?
Also, your team could consider adding some description in words about the implementation so that it would be easier for the reader to understand the diagram.


Step 2. Read the first line of the status file, if a character ‘0’ is found, deactivate the automated cleanup. Else if a character ‘1’ is found, activate the automated cleanup.

![image_info](./pictures/FlowchartinitCleaner.png)
Copy link

@joelczk joelczk Mar 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines in the diagram are difficult to be seen. Perhaps it would be better to change the colour of the lines in the diagram so the diagram looks more visible for the reader?
Also, your team could consider adding in notes by the side of the diagram to indicate the meaning of "0" and "1" at the side of the diagram to allow readers to have a better understanding

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you could also change the background theme of your Developer Guide to a lighter colour scheme. Just a recommendation, would it be better for you to use a boolean "True" and "False" instead of "1" and "0"

- Constructing a Storage object via `Storage(String dataFilePath)`, which takes in the path to the desired data file (or the path where the user wants to create the data file) as a String object.
- Creating a data file via `createDataFile`.
- Writing to a data file via `writeToFile`. This function takes a single string as parameter and writes it to the data file. It is recommended to only pass single-line strings to keep the file nicely formatted.
Loading a pre-existing data file via `loadFile`. If a data file already exists for the provided data file path, the function will return `true`; if the specified data file did not previously exist, this function will call the `createDataFile` method and returns `false`. The return value is useful so that the application knows whether or not this is the first session with a specific data file or if data already exists.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This portion is very lengthy, which makes it very confusing to understand. Perhaps you could break down this portion into smaller parts?
You could also consider adding sequence diagrams showing the higher-level flow of the Storage class to help readers understand the flow of Storage class


#### 3.4.1 Current Implementation
The following sequence diagram shows how the edit feature works.
![image_info](./pictures/EditSequenceDiagram.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similiar to the comment that I gave above, the lines in the diagram are difficult to be seen. Perhaps it would be better to change the colour of the lines in the diagram so that the diagram looks more visible for the reader?

* Else, it will respond to the user that there are no tasks which match the given keyword.


![filter seq diagram](https://imgur.com/hybT3R9.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagram that is drawn may be too complicated for the readers as there are many "Loop" and "opt" between the Parser class and the FilterCommand class. Perhaps, you could consider breaking down the diagrams to show smaller components so that it is easier to understand?

{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
### Instructions for Manual Testing

#### Launch and Shutdown
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Launch and Shutdown is not formatted properly. Perhaps, you have added in an extra space?


Step 2b. If the attribute toClean is equal to true, access the storage data file and remove some of the activities starting from the oldest. Put these deleted activities into the data file under the ‘recycled’ folder.

![image_info](./pictures/SDautoClean.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dotted lines from the Storage Class and StorageCleaner class extends beyond the cross symbol. Perhaps you could change the dotted lines to end at the cross symbol since the classes would already have been deleted by then?

The continue feature allows the user to continue a previously ended activity.

#### 3.5.1 Current Implementation
![Continue command sequence diagram](./pictures/continueActivity.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue command

  1. Is the entities labelled correctly? Should it be not underlined?
  2. Is there a missing return arrow from the Parser?
  3. Is the order of getTags() and now() in the wrong order from looking at the code?
  4. Is using opt correct? should it be alt? Since you used if else statement in your code.
  5. Is there issue with the lifeline not attached to the activation bar in ContinueCommand.

2. Gets the *name* and *tags* of the activity to be continued and saves it to a public static variable of *Parser* object
3. Gets the current time and saves it to a public static variable of *Parser* object

![End command sequence diagram](./pictures/endActivity.PNG)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inkedend command3_LI

  1. Is the entities labelled correctly? Should it be not underlined?
  2. Should the parser use a activation bar instead of line to make it more consistent for the user?
  3. Is there an error with a line in the middle of EndCommand at the left hand side?
  4. From code based has if else, should you use alt instead of opt?
  5. Missing return arrow from updateDuration.
  6. Similar issue with the lifeline not attached to the activation bar in EndCommand.
  7. Is the text at the line of executeCommand() a meaningful one?


#### 3.4.1 Current Implementation
The following sequence diagram shows how the edit feature works.
![image_info](./pictures/EditSequenceDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit sequence_LI

  1. Is the entities labelled correctly? Should it be not underlined?
  2. Should the parser use a activation bar instead of line to make it more consistent for the user?
  3. Is there an error with a line in the middle of EditCommand at the left hand side?
  4. should it be dashed arrow instead of solid line arrow at get()?
  5. should the return arrow for updateName() be at the end.
  6. should the activity have a up arrow?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Step 2b. If the attribute toClean is equal to true, access the storage data file and remove some of the activities starting from the oldest. Put these deleted activities into the data file under the ‘recycled’ folder.

![image_info](./pictures/SDautoClean.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoclean_LI

  1. Is the entities labelled correctly? Should it be not underlined?
  2. should you use alt instead of alternative?
  3. should object deletion still have life line extended after the X?
  4. Creation of storage constructor, activation bar not sticked to the entity.
  5. Should the return arrow return halfway of the activation bar in the alt? Perhaps extending the activation bar then have it return.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to the sequence diagram screenshot as shown below.

Under the blue arrow, StorageCleaner is initialized, from the CallerClass, by calling its constructor. My question is, should there be a name before the semicolon? For example: someName:StorageCleaner

image

Copy link

@NizarMohd NizarMohd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the DG was pretty well done. As mentioned by other reviewers, you may want to consider either using a brighter background or brighter arrows as some diagrams may not be very visible because the arrows and the backgrounds are of the same colour. All in all, good job!


{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
## 2. Design
![image_info](./pictures/ClassDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, the UML diagram is pretty large. Aside from breaking down the UML into components, perhaps you might want to look into attributes in certain classes that have already been shown with an association? For example, you have the Parser class associated with StorageCleaner, and at the same time StorageCleaner is an attribute listed in the Parser Class. Perhaps you can consider omitting either the association or the attribute as mentioned in the 2113 website https://nus-cs2113-ay1920s2.github.io/website/se-book-adapted/chapters/uml.html#class-diagrams.


Step 2b. If ‘status’ is equal to false, deactivate the automated cleanup and write the character ‘0’ to the first line of the status file.

![image_info](./pictures/FlowchartsetStatus.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of activity diagram to explain the control flow


{Give non-functional requirements}

## Glossary
### Glossary

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you can use the explanation of crucial methods here, and add a clickable to direct the readers here when they stumble upon the usage of such methods in the DG. This may be a good way to help reduce the content in your implementation and make it look more succinct.

@@ -1,34 +1,283 @@
# Developer Guide

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you can add a table of contents and employ clickable(s) to make the DG more navigable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add in an introduction to your Development Guide that includes purpose of documentation, intended reader, brief description of your product.

Copy link

@benchan911 benchan911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to seeing your product.

@@ -1,34 +1,283 @@
# Developer Guide

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add in an introduction to your Development Guide that includes purpose of documentation, intended reader, brief description of your product.


{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
## 2. Design
![image_info](./pictures/ClassDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add on to the above, it is not only not a requirement, but also not recommended by the professor to state all attributes and methods for a class diagram. You are recommended to include important details that will benefit the reader when they read your development guide.

It will also be clearer to include a brief explanation for you Fig 2.1. Class diagram of the Jikan program, to guide the reader through your UML diagram.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TA here.

General rule of thumb: More important for the diagram to be comprehensible than comprehensive.

@damithc


Step 2. Read the first line of the status file, if a character ‘0’ is found, deactivate the automated cleanup. Else if a character ‘1’ is found, activate the automated cleanup.

![image_info](./pictures/FlowchartinitCleaner.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you could also change the background theme of your Developer Guide to a lighter colour scheme. Just a recommendation, would it be better for you to use a boolean "True" and "False" instead of "1" and "0"


Step 2b. If the attribute toClean is equal to true, access the storage data file and remove some of the activities starting from the oldest. Put these deleted activities into the data file under the ‘recycled’ folder.

![image_info](./pictures/SDautoClean.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


#### 3.4.1 Current Implementation
The following sequence diagram shows how the edit feature works.
![image_info](./pictures/EditSequenceDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* Else, it will respond to the user that there are no tasks which match the given keyword.


![find seq diagram](https://imgur.com/Icg5rdB.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good use of sequence diagram. Perhaps you can reference from this when making future changes.


**Execution:**
- Continue by activity name (current implementation)
**Cons:** Activity names have to be unique.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that there is a minor formatting error here. It will be clearer if you can break it into different lines instead of a single line.
image

@@ -1,34 +1,283 @@
# Developer Guide

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Nizar, perhaps providing Table of Contents can improve navigability


{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
## 2. Design
![image_info](./pictures/ClassDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For class diagram, I think there should not be a semicolon before the class name.

According to the website linked here, under Object vs Class diagram, it says that There is a : before the class name for object diagram. Since this is a class diagram, then the semi colon should be omitted.

For your convenience, I have attached a snapshot of the aforementioned section~
image


##### initialiseCleaner

Step 1. Loads up the status file for reading. If the status file is not found, create a new status file and write the character ‘0’ to the first line of the status file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using step 1. step 2. etc. to denote the steps of initializingCleaner, would it is better to use Markdown's available numbered list? This might improve reader visual as Markdown's default number list provides some indentation.

For example: we can write it like this.

initialiseCleaner

This section demonstrates the steps when initializing the cleaner.

  1. Loads up the status file .....
  2. Read the first line ....


##### setStatus

Step 1. Read the boolean parameter ‘status’.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to my comment above regarding using Markup default numbering list, to have a "nested-list" to deal with step 2a and step 2b.


Step 2b. If the attribute toClean is equal to true, access the storage data file and remove some of the activities starting from the oldest. Put these deleted activities into the data file under the ‘recycled’ folder.

![image_info](./pictures/SDautoClean.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to the sequence diagram screenshot as shown below.

Under the blue arrow, StorageCleaner is initialized, from the CallerClass, by calling its constructor. My question is, should there be a name before the semicolon? For example: someName:StorageCleaner

image

* Else, it will respond to the user that there are no tasks which match the given keyword.


![filter seq diagram](https://imgur.com/hybT3R9.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to this screenshot for the issue below
image

For exeucteCommad(), I believe the arrow should point towards the top of the activation bar

===============================================================

Please refer to the below screenshot for the issue below
image

Should the dotted line (as indicated by the red arrow) be a solid line, since it is a method call?

siuhian and others added 25 commits April 6, 2020 00:39
Add delete tag goal and fix update tag goal exception handling
# Conflicts:
#	docs/DeveloperGuide.md
#	docs/pictures/continue.png
#	docs/pictures/end.png
#	docs/pictures/graph.png
Update DG list and graph
Add Storage and StorageHandler assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.